package test.mapreduce;

import java.io.FileOutputStream;
import java.io.IOException;

public class MakeFile {
	public static void main(String[] args) throws IOException {
		String[] keys = {"A","B","C","D","E","F","G","H","I","J"};
		FileOutputStream fos = new FileOutputStream("..\\..\\data\\spark\\TestMapReduce\\testData.txt");
		for(int i = 0; i < 1000000; i ++){
			int index = (int)(Math.random() * 10);
			double value = Math.random();
			fos.write((keys[index]+","+value+"\n").getBytes());
		}
		fos.close();
	}
}
